#ifndef __UNILOG_H__
#define __UNILOG_H__

#include <string>
#include <Windows.h>
using namespace std;

#define VERIFY_FUNC(a,b) if (!(a)) GetErrMsg(#a,__FILE__, __LINE__,b)

class CUniLog;
void GetErrMsg(LPSTR linedesc, LPSTR filename, int lineno,CUniLog*);

class CUniLog
{

private:
	FILE*			m_logFile;	
public:

	CUniLog():m_logFile(NULL)
	{
	}

	~CUniLog()
	{
		if(m_logFile)
			CloseLog();
	}

	VOID InitLog(std::wstring wstrLogPath);

public:
	
	static CHAR* UnicodeToANSI(const WCHAR* str );
	static WCHAR* ANSIToUnicode( CHAR* str );

	void DlLog(WCHAR* wszInfo);
	void DlLog(CHAR* szInfo);
	void CloseLog();

};






#endif//__UNILOG_H__